/*
 * 
 * WordPres版微信小程序
 * author: jianbo
 * organization: 守望轩  www.watch-life.net
 * github:    https://github.com/iamxjb/winxin-app-watch-life.net
 * 技术支持微信号：iamxjb
 * Copyright (c) 2017 https://www.watch-life.net All rights reserved.
 * 
 */


App({
  onLaunch: function () {
    //调用API从本地缓存中获取数据
    var logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)
  },
  getUserInfo:function(){
    var that = this;
    wx.login({
      success: loginRes => {
        if (loginRes.code) {
          wx.getUserInfo({
            withCredentials: true,
            success: res => {

            }
          })
        }
      }
    })
  },
  globalData:{
    userInfo:null,
    openid:'',
    uid:0,
    token:'',
    page_size: 5,
    post_img_num: 6,
    app_name:'',
    isGetUserInfo:false,
    isGetOpenid:false
  }
})